
var UserData = require('../UserData.js')
cc.Class({
    extends: cc.Component,

    properties: {

    },

    // LIFE-CYCLE CALLBACKS:

    // onLoad () {},

    start () {
        this.lastCurrentMoney = 0.00000001
    },

    update (dt) {
        if(UserData.state.currentMoney){
            /*if((UserData.state.currentMoney-this.lastCurrentMoney)/this.lastCurrentMoney>0.01){//{增长的钱大于1%
                this.node.getChildByName('label').runAction(cc.sequence(cc.scaleTo(0.2,1.2,1.2),cc.scaleTo(0.2,1,1)))
            }*/
            this.node.getChildByName('label').getComponent('labelFixed').setNumber(UserData.state.currentMoney,"$","")
            this.node.getChildByName('gpsHint').getChildByName('label').getComponent('labelFixed').setNumber(UserData.runtimeState.totalGPS,"",'/s')
        }
    },
});
